<?php
/**
 * 景区介绍
 * Created by PhpStorm.
 * User: wanghaibo
 * Date: 17/12/5
 * Time: 17:44
 */

namespace App\Http\Controllers\Admin\Scene;


use App\Http\Controllers\Controller;
use App\Http\Controllers\Admin\Scene\Service\SceneIntroduce;
use Illuminate\Http\Request;

class IntroduceController extends Controller
{
    private $manager;
    public function __construct ()
    {
        $this->manager = new SceneIntroduce();

    }

    public function index(){
        $model = $this->manager->get();
        return view('admin.scene.introduce.index',[
            'model' =>  $model
        ]);
    }
    public function update(Request $request){
        $this->validate($request,[
            'desc'  =>  'max:200'
        ]);
        $post = $request->post();
        $this->manager->update($request->post());
        return redirect()->route('admin.scene.introduce')->with(
            $this->success()
        );
    }
}